package lyn2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lyn
 * Date: 2025-01-18
 * Time: 14:44
 */
class Animal{
    String name;   int age;    String sex;
    public void greet(){
        System.out.println(name+"大家好！！！");
    }
    public void sleep(){
        System.out.println(name+"在睡觉！！！");
    }
    public void drink(){
        System.out.println(name+"在喝水！！！");
    }
}
class Cat extends Animal{
    public void eat(){
        System.out.println(name+"吃猫粮！！！");
    }
}
class Dog extends Animal{
    public void eat(){
        System.out.println(name+"吃狗粮！！！");
    }
}
public class text4 {
}
